package one;

import java.util.Scanner;

public class test11075 {
    public static void main(String[] args) {
//        53(x+1)/256 (12x+8)+53(x+1)/256
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int i = 255;
        int sum = 3121;
        if(n<sum){
            System.out.print("impossible");
        }
        while (sum <= n) {
            sum = (12 * i + 8) + 53 * (i + 1) / 256;
            if ((53 * (i + 1)) % 256 == 0) {
                System.out.print(sum + " ");
            }
            i++;
        }
    }
}
